Left Termination of the query pattern queens_in_1(a) w.r.t. the given Prolog program could successfully be proven:



Prolog
  ↳ PrologToPiTRSProof

Clauses:

queens(Y) :- ','(perm(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y), safe(Y)).
perm([], []).
perm(.(X, Y), .(V, Res)) :- ','(delete(V, .(X, Y), Rest), perm(Rest, Res)).
delete(X, .(X, Y), Y).
delete(X, .(F, T), .(F, R)) :- delete(X, T, R).
safe([]).
safe(.(X, Y)) :- ','(noattack(X, Y, s(0)), safe(Y)).
noattack(X, [], N).
noattack(X, .(F, T), N) :- ','(notEq(X, F), ','(add(F, N, FplusN), ','(notEq(X, FplusN), ','(add(X, N, XplusN), ','(notEq(F, XplusN), noattack(X, T, s(N))))))).
add(0, X, X).
add(s(X), Y, s(Z)) :- add(X, Y, Z).
notEq(0, s(X)).
notEq(s(X), 0).
notEq(s(X), s(Y)) :- notEq(X, Y).

Queries:

queens(a).

We use the technique of [30]. With regard to the inferred argument filtering the predicates were used in the following modes:
queens_in: (f)
perm_in: (b,f)
delete_in: (f,b,f)
safe_in: (b)
noattack_in: (b,b,b)
notEq_in: (b,b)
add_in: (b,b,f)
Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

queens_in_a(Y) → U1_a(Y, perm_in_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y))
perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(.(X, Y), .(V, Res)) → U3_ga(X, Y, V, Res, delete_in_aga(V, .(X, Y), Rest))
delete_in_aga(X, .(X, Y), Y) → delete_out_aga(X, .(X, Y), Y)
delete_in_aga(X, .(F, T), .(F, R)) → U5_aga(X, F, T, R, delete_in_aga(X, T, R))
U5_aga(X, F, T, R, delete_out_aga(X, T, R)) → delete_out_aga(X, .(F, T), .(F, R))
U3_ga(X, Y, V, Res, delete_out_aga(V, .(X, Y), Rest)) → U4_ga(X, Y, V, Res, perm_in_ga(Rest, Res))
U4_ga(X, Y, V, Res, perm_out_ga(Rest, Res)) → perm_out_ga(.(X, Y), .(V, Res))
U1_a(Y, perm_out_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y)) → U2_a(Y, safe_in_g(Y))
safe_in_g([]) → safe_out_g([])
safe_in_g(.(X, Y)) → U6_g(X, Y, noattack_in_ggg(X, Y, s(0)))
noattack_in_ggg(X, [], N) → noattack_out_ggg(X, [], N)
noattack_in_ggg(X, .(F, T), N) → U8_ggg(X, F, T, N, notEq_in_gg(X, F))
notEq_in_gg(0, s(X)) → notEq_out_gg(0, s(X))
notEq_in_gg(s(X), 0) → notEq_out_gg(s(X), 0)
notEq_in_gg(s(X), s(Y)) → U15_gg(X, Y, notEq_in_gg(X, Y))
U15_gg(X, Y, notEq_out_gg(X, Y)) → notEq_out_gg(s(X), s(Y))
U8_ggg(X, F, T, N, notEq_out_gg(X, F)) → U9_ggg(X, F, T, N, add_in_gga(F, N, FplusN))
add_in_gga(0, X, X) → add_out_gga(0, X, X)
add_in_gga(s(X), Y, s(Z)) → U14_gga(X, Y, Z, add_in_gga(X, Y, Z))
U14_gga(X, Y, Z, add_out_gga(X, Y, Z)) → add_out_gga(s(X), Y, s(Z))
U9_ggg(X, F, T, N, add_out_gga(F, N, FplusN)) → U10_ggg(X, F, T, N, FplusN, notEq_in_gg(X, FplusN))
U10_ggg(X, F, T, N, FplusN, notEq_out_gg(X, FplusN)) → U11_ggg(X, F, T, N, FplusN, add_in_gga(X, N, XplusN))
U11_ggg(X, F, T, N, FplusN, add_out_gga(X, N, XplusN)) → U12_ggg(X, F, T, N, notEq_in_gg(F, XplusN))
U12_ggg(X, F, T, N, notEq_out_gg(F, XplusN)) → U13_ggg(X, F, T, N, noattack_in_ggg(X, T, s(N)))
U13_ggg(X, F, T, N, noattack_out_ggg(X, T, s(N))) → noattack_out_ggg(X, .(F, T), N)
U6_g(X, Y, noattack_out_ggg(X, Y, s(0))) → U7_g(X, Y, safe_in_g(Y))
U7_g(X, Y, safe_out_g(Y)) → safe_out_g(.(X, Y))
U2_a(Y, safe_out_g(Y)) → queens_out_a(Y)

The argument filtering Pi contains the following mapping:
queens_in_a(x1)  =  queens_in_a
U1_a(x1, x2)  =  U1_a(x2)
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
[]  =  []
perm_out_ga(x1, x2)  =  perm_out_ga(x2)
.(x1, x2)  =  .(x1, x2)
U3_ga(x1, x2, x3, x4, x5)  =  U3_ga(x5)
delete_in_aga(x1, x2, x3)  =  delete_in_aga(x2)
delete_out_aga(x1, x2, x3)  =  delete_out_aga(x1, x3)
U5_aga(x1, x2, x3, x4, x5)  =  U5_aga(x2, x5)
U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x3, x5)
s(x1)  =  s(x1)
0  =  0
U2_a(x1, x2)  =  U2_a(x1, x2)
safe_in_g(x1)  =  safe_in_g(x1)
safe_out_g(x1)  =  safe_out_g
U6_g(x1, x2, x3)  =  U6_g(x2, x3)
noattack_in_ggg(x1, x2, x3)  =  noattack_in_ggg(x1, x2, x3)
noattack_out_ggg(x1, x2, x3)  =  noattack_out_ggg
U8_ggg(x1, x2, x3, x4, x5)  =  U8_ggg(x1, x2, x3, x4, x5)
notEq_in_gg(x1, x2)  =  notEq_in_gg(x1, x2)
notEq_out_gg(x1, x2)  =  notEq_out_gg
U15_gg(x1, x2, x3)  =  U15_gg(x3)
U9_ggg(x1, x2, x3, x4, x5)  =  U9_ggg(x1, x2, x3, x4, x5)
add_in_gga(x1, x2, x3)  =  add_in_gga(x1, x2)
add_out_gga(x1, x2, x3)  =  add_out_gga(x3)
U14_gga(x1, x2, x3, x4)  =  U14_gga(x4)
U10_ggg(x1, x2, x3, x4, x5, x6)  =  U10_ggg(x1, x2, x3, x4, x6)
U11_ggg(x1, x2, x3, x4, x5, x6)  =  U11_ggg(x1, x2, x3, x4, x6)
U12_ggg(x1, x2, x3, x4, x5)  =  U12_ggg(x1, x3, x4, x5)
U13_ggg(x1, x2, x3, x4, x5)  =  U13_ggg(x5)
U7_g(x1, x2, x3)  =  U7_g(x3)
queens_out_a(x1)  =  queens_out_a(x1)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog



↳ Prolog
  ↳ PrologToPiTRSProof
PiTRS
      ↳ DependencyPairsProof

Pi-finite rewrite system:
The TRS R consists of the following rules:

queens_in_a(Y) → U1_a(Y, perm_in_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y))
perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(.(X, Y), .(V, Res)) → U3_ga(X, Y, V, Res, delete_in_aga(V, .(X, Y), Rest))
delete_in_aga(X, .(X, Y), Y) → delete_out_aga(X, .(X, Y), Y)
delete_in_aga(X, .(F, T), .(F, R)) → U5_aga(X, F, T, R, delete_in_aga(X, T, R))
U5_aga(X, F, T, R, delete_out_aga(X, T, R)) → delete_out_aga(X, .(F, T), .(F, R))
U3_ga(X, Y, V, Res, delete_out_aga(V, .(X, Y), Rest)) → U4_ga(X, Y, V, Res, perm_in_ga(Rest, Res))
U4_ga(X, Y, V, Res, perm_out_ga(Rest, Res)) → perm_out_ga(.(X, Y), .(V, Res))
U1_a(Y, perm_out_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y)) → U2_a(Y, safe_in_g(Y))
safe_in_g([]) → safe_out_g([])
safe_in_g(.(X, Y)) → U6_g(X, Y, noattack_in_ggg(X, Y, s(0)))
noattack_in_ggg(X, [], N) → noattack_out_ggg(X, [], N)
noattack_in_ggg(X, .(F, T), N) → U8_ggg(X, F, T, N, notEq_in_gg(X, F))
notEq_in_gg(0, s(X)) → notEq_out_gg(0, s(X))
notEq_in_gg(s(X), 0) → notEq_out_gg(s(X), 0)
notEq_in_gg(s(X), s(Y)) → U15_gg(X, Y, notEq_in_gg(X, Y))
U15_gg(X, Y, notEq_out_gg(X, Y)) → notEq_out_gg(s(X), s(Y))
U8_ggg(X, F, T, N, notEq_out_gg(X, F)) → U9_ggg(X, F, T, N, add_in_gga(F, N, FplusN))
add_in_gga(0, X, X) → add_out_gga(0, X, X)
add_in_gga(s(X), Y, s(Z)) → U14_gga(X, Y, Z, add_in_gga(X, Y, Z))
U14_gga(X, Y, Z, add_out_gga(X, Y, Z)) → add_out_gga(s(X), Y, s(Z))
U9_ggg(X, F, T, N, add_out_gga(F, N, FplusN)) → U10_ggg(X, F, T, N, FplusN, notEq_in_gg(X, FplusN))
U10_ggg(X, F, T, N, FplusN, notEq_out_gg(X, FplusN)) → U11_ggg(X, F, T, N, FplusN, add_in_gga(X, N, XplusN))
U11_ggg(X, F, T, N, FplusN, add_out_gga(X, N, XplusN)) → U12_ggg(X, F, T, N, notEq_in_gg(F, XplusN))
U12_ggg(X, F, T, N, notEq_out_gg(F, XplusN)) → U13_ggg(X, F, T, N, noattack_in_ggg(X, T, s(N)))
U13_ggg(X, F, T, N, noattack_out_ggg(X, T, s(N))) → noattack_out_ggg(X, .(F, T), N)
U6_g(X, Y, noattack_out_ggg(X, Y, s(0))) → U7_g(X, Y, safe_in_g(Y))
U7_g(X, Y, safe_out_g(Y)) → safe_out_g(.(X, Y))
U2_a(Y, safe_out_g(Y)) → queens_out_a(Y)

The argument filtering Pi contains the following mapping:
queens_in_a(x1)  =  queens_in_a
U1_a(x1, x2)  =  U1_a(x2)
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
[]  =  []
perm_out_ga(x1, x2)  =  perm_out_ga(x2)
.(x1, x2)  =  .(x1, x2)
U3_ga(x1, x2, x3, x4, x5)  =  U3_ga(x5)
delete_in_aga(x1, x2, x3)  =  delete_in_aga(x2)
delete_out_aga(x1, x2, x3)  =  delete_out_aga(x1, x3)
U5_aga(x1, x2, x3, x4, x5)  =  U5_aga(x2, x5)
U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x3, x5)
s(x1)  =  s(x1)
0  =  0
U2_a(x1, x2)  =  U2_a(x1, x2)
safe_in_g(x1)  =  safe_in_g(x1)
safe_out_g(x1)  =  safe_out_g
U6_g(x1, x2, x3)  =  U6_g(x2, x3)
noattack_in_ggg(x1, x2, x3)  =  noattack_in_ggg(x1, x2, x3)
noattack_out_ggg(x1, x2, x3)  =  noattack_out_ggg
U8_ggg(x1, x2, x3, x4, x5)  =  U8_ggg(x1, x2, x3, x4, x5)
notEq_in_gg(x1, x2)  =  notEq_in_gg(x1, x2)
notEq_out_gg(x1, x2)  =  notEq_out_gg
U15_gg(x1, x2, x3)  =  U15_gg(x3)
U9_ggg(x1, x2, x3, x4, x5)  =  U9_ggg(x1, x2, x3, x4, x5)
add_in_gga(x1, x2, x3)  =  add_in_gga(x1, x2)
add_out_gga(x1, x2, x3)  =  add_out_gga(x3)
U14_gga(x1, x2, x3, x4)  =  U14_gga(x4)
U10_ggg(x1, x2, x3, x4, x5, x6)  =  U10_ggg(x1, x2, x3, x4, x6)
U11_ggg(x1, x2, x3, x4, x5, x6)  =  U11_ggg(x1, x2, x3, x4, x6)
U12_ggg(x1, x2, x3, x4, x5)  =  U12_ggg(x1, x3, x4, x5)
U13_ggg(x1, x2, x3, x4, x5)  =  U13_ggg(x5)
U7_g(x1, x2, x3)  =  U7_g(x3)
queens_out_a(x1)  =  queens_out_a(x1)


Using Dependency Pairs [1,30] we result in the following initial DP problem:
Pi DP problem:
The TRS P consists of the following rules:

QUEENS_IN_A(Y) → U1_A(Y, perm_in_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y))
QUEENS_IN_A(Y) → PERM_IN_GA(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y)
PERM_IN_GA(.(X, Y), .(V, Res)) → U3_GA(X, Y, V, Res, delete_in_aga(V, .(X, Y), Rest))
PERM_IN_GA(.(X, Y), .(V, Res)) → DELETE_IN_AGA(V, .(X, Y), Rest)
DELETE_IN_AGA(X, .(F, T), .(F, R)) → U5_AGA(X, F, T, R, delete_in_aga(X, T, R))
DELETE_IN_AGA(X, .(F, T), .(F, R)) → DELETE_IN_AGA(X, T, R)
U3_GA(X, Y, V, Res, delete_out_aga(V, .(X, Y), Rest)) → U4_GA(X, Y, V, Res, perm_in_ga(Rest, Res))
U3_GA(X, Y, V, Res, delete_out_aga(V, .(X, Y), Rest)) → PERM_IN_GA(Rest, Res)
U1_A(Y, perm_out_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y)) → U2_A(Y, safe_in_g(Y))
U1_A(Y, perm_out_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y)) → SAFE_IN_G(Y)
SAFE_IN_G(.(X, Y)) → U6_G(X, Y, noattack_in_ggg(X, Y, s(0)))
SAFE_IN_G(.(X, Y)) → NOATTACK_IN_GGG(X, Y, s(0))
NOATTACK_IN_GGG(X, .(F, T), N) → U8_GGG(X, F, T, N, notEq_in_gg(X, F))
NOATTACK_IN_GGG(X, .(F, T), N) → NOTEQ_IN_GG(X, F)
NOTEQ_IN_GG(s(X), s(Y)) → U15_GG(X, Y, notEq_in_gg(X, Y))
NOTEQ_IN_GG(s(X), s(Y)) → NOTEQ_IN_GG(X, Y)
U8_GGG(X, F, T, N, notEq_out_gg(X, F)) → U9_GGG(X, F, T, N, add_in_gga(F, N, FplusN))
U8_GGG(X, F, T, N, notEq_out_gg(X, F)) → ADD_IN_GGA(F, N, FplusN)
ADD_IN_GGA(s(X), Y, s(Z)) → U14_GGA(X, Y, Z, add_in_gga(X, Y, Z))
ADD_IN_GGA(s(X), Y, s(Z)) → ADD_IN_GGA(X, Y, Z)
U9_GGG(X, F, T, N, add_out_gga(F, N, FplusN)) → U10_GGG(X, F, T, N, FplusN, notEq_in_gg(X, FplusN))
U9_GGG(X, F, T, N, add_out_gga(F, N, FplusN)) → NOTEQ_IN_GG(X, FplusN)
U10_GGG(X, F, T, N, FplusN, notEq_out_gg(X, FplusN)) → U11_GGG(X, F, T, N, FplusN, add_in_gga(X, N, XplusN))
U10_GGG(X, F, T, N, FplusN, notEq_out_gg(X, FplusN)) → ADD_IN_GGA(X, N, XplusN)
U11_GGG(X, F, T, N, FplusN, add_out_gga(X, N, XplusN)) → U12_GGG(X, F, T, N, notEq_in_gg(F, XplusN))
U11_GGG(X, F, T, N, FplusN, add_out_gga(X, N, XplusN)) → NOTEQ_IN_GG(F, XplusN)
U12_GGG(X, F, T, N, notEq_out_gg(F, XplusN)) → U13_GGG(X, F, T, N, noattack_in_ggg(X, T, s(N)))
U12_GGG(X, F, T, N, notEq_out_gg(F, XplusN)) → NOATTACK_IN_GGG(X, T, s(N))
U6_G(X, Y, noattack_out_ggg(X, Y, s(0))) → U7_G(X, Y, safe_in_g(Y))
U6_G(X, Y, noattack_out_ggg(X, Y, s(0))) → SAFE_IN_G(Y)

The TRS R consists of the following rules:

queens_in_a(Y) → U1_a(Y, perm_in_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y))
perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(.(X, Y), .(V, Res)) → U3_ga(X, Y, V, Res, delete_in_aga(V, .(X, Y), Rest))
delete_in_aga(X, .(X, Y), Y) → delete_out_aga(X, .(X, Y), Y)
delete_in_aga(X, .(F, T), .(F, R)) → U5_aga(X, F, T, R, delete_in_aga(X, T, R))
U5_aga(X, F, T, R, delete_out_aga(X, T, R)) → delete_out_aga(X, .(F, T), .(F, R))
U3_ga(X, Y, V, Res, delete_out_aga(V, .(X, Y), Rest)) → U4_ga(X, Y, V, Res, perm_in_ga(Rest, Res))
U4_ga(X, Y, V, Res, perm_out_ga(Rest, Res)) → perm_out_ga(.(X, Y), .(V, Res))
U1_a(Y, perm_out_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y)) → U2_a(Y, safe_in_g(Y))
safe_in_g([]) → safe_out_g([])
safe_in_g(.(X, Y)) → U6_g(X, Y, noattack_in_ggg(X, Y, s(0)))
noattack_in_ggg(X, [], N) → noattack_out_ggg(X, [], N)
noattack_in_ggg(X, .(F, T), N) → U8_ggg(X, F, T, N, notEq_in_gg(X, F))
notEq_in_gg(0, s(X)) → notEq_out_gg(0, s(X))
notEq_in_gg(s(X), 0) → notEq_out_gg(s(X), 0)
notEq_in_gg(s(X), s(Y)) → U15_gg(X, Y, notEq_in_gg(X, Y))
U15_gg(X, Y, notEq_out_gg(X, Y)) → notEq_out_gg(s(X), s(Y))
U8_ggg(X, F, T, N, notEq_out_gg(X, F)) → U9_ggg(X, F, T, N, add_in_gga(F, N, FplusN))
add_in_gga(0, X, X) → add_out_gga(0, X, X)
add_in_gga(s(X), Y, s(Z)) → U14_gga(X, Y, Z, add_in_gga(X, Y, Z))
U14_gga(X, Y, Z, add_out_gga(X, Y, Z)) → add_out_gga(s(X), Y, s(Z))
U9_ggg(X, F, T, N, add_out_gga(F, N, FplusN)) → U10_ggg(X, F, T, N, FplusN, notEq_in_gg(X, FplusN))
U10_ggg(X, F, T, N, FplusN, notEq_out_gg(X, FplusN)) → U11_ggg(X, F, T, N, FplusN, add_in_gga(X, N, XplusN))
U11_ggg(X, F, T, N, FplusN, add_out_gga(X, N, XplusN)) → U12_ggg(X, F, T, N, notEq_in_gg(F, XplusN))
U12_ggg(X, F, T, N, notEq_out_gg(F, XplusN)) → U13_ggg(X, F, T, N, noattack_in_ggg(X, T, s(N)))
U13_ggg(X, F, T, N, noattack_out_ggg(X, T, s(N))) → noattack_out_ggg(X, .(F, T), N)
U6_g(X, Y, noattack_out_ggg(X, Y, s(0))) → U7_g(X, Y, safe_in_g(Y))
U7_g(X, Y, safe_out_g(Y)) → safe_out_g(.(X, Y))
U2_a(Y, safe_out_g(Y)) → queens_out_a(Y)

The argument filtering Pi contains the following mapping:
queens_in_a(x1)  =  queens_in_a
U1_a(x1, x2)  =  U1_a(x2)
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
[]  =  []
perm_out_ga(x1, x2)  =  perm_out_ga(x2)
.(x1, x2)  =  .(x1, x2)
U3_ga(x1, x2, x3, x4, x5)  =  U3_ga(x5)
delete_in_aga(x1, x2, x3)  =  delete_in_aga(x2)
delete_out_aga(x1, x2, x3)  =  delete_out_aga(x1, x3)
U5_aga(x1, x2, x3, x4, x5)  =  U5_aga(x2, x5)
U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x3, x5)
s(x1)  =  s(x1)
0  =  0
U2_a(x1, x2)  =  U2_a(x1, x2)
safe_in_g(x1)  =  safe_in_g(x1)
safe_out_g(x1)  =  safe_out_g
U6_g(x1, x2, x3)  =  U6_g(x2, x3)
noattack_in_ggg(x1, x2, x3)  =  noattack_in_ggg(x1, x2, x3)
noattack_out_ggg(x1, x2, x3)  =  noattack_out_ggg
U8_ggg(x1, x2, x3, x4, x5)  =  U8_ggg(x1, x2, x3, x4, x5)
notEq_in_gg(x1, x2)  =  notEq_in_gg(x1, x2)
notEq_out_gg(x1, x2)  =  notEq_out_gg
U15_gg(x1, x2, x3)  =  U15_gg(x3)
U9_ggg(x1, x2, x3, x4, x5)  =  U9_ggg(x1, x2, x3, x4, x5)
add_in_gga(x1, x2, x3)  =  add_in_gga(x1, x2)
add_out_gga(x1, x2, x3)  =  add_out_gga(x3)
U14_gga(x1, x2, x3, x4)  =  U14_gga(x4)
U10_ggg(x1, x2, x3, x4, x5, x6)  =  U10_ggg(x1, x2, x3, x4, x6)
U11_ggg(x1, x2, x3, x4, x5, x6)  =  U11_ggg(x1, x2, x3, x4, x6)
U12_ggg(x1, x2, x3, x4, x5)  =  U12_ggg(x1, x3, x4, x5)
U13_ggg(x1, x2, x3, x4, x5)  =  U13_ggg(x5)
U7_g(x1, x2, x3)  =  U7_g(x3)
queens_out_a(x1)  =  queens_out_a(x1)
SAFE_IN_G(x1)  =  SAFE_IN_G(x1)
U1_A(x1, x2)  =  U1_A(x2)
U4_GA(x1, x2, x3, x4, x5)  =  U4_GA(x3, x5)
U6_G(x1, x2, x3)  =  U6_G(x2, x3)
U12_GGG(x1, x2, x3, x4, x5)  =  U12_GGG(x1, x3, x4, x5)
U11_GGG(x1, x2, x3, x4, x5, x6)  =  U11_GGG(x1, x2, x3, x4, x6)
U7_G(x1, x2, x3)  =  U7_G(x3)
U13_GGG(x1, x2, x3, x4, x5)  =  U13_GGG(x5)
U8_GGG(x1, x2, x3, x4, x5)  =  U8_GGG(x1, x2, x3, x4, x5)
QUEENS_IN_A(x1)  =  QUEENS_IN_A
ADD_IN_GGA(x1, x2, x3)  =  ADD_IN_GGA(x1, x2)
U14_GGA(x1, x2, x3, x4)  =  U14_GGA(x4)
U9_GGG(x1, x2, x3, x4, x5)  =  U9_GGG(x1, x2, x3, x4, x5)
U5_AGA(x1, x2, x3, x4, x5)  =  U5_AGA(x2, x5)
NOTEQ_IN_GG(x1, x2)  =  NOTEQ_IN_GG(x1, x2)
U15_GG(x1, x2, x3)  =  U15_GG(x3)
DELETE_IN_AGA(x1, x2, x3)  =  DELETE_IN_AGA(x2)
U2_A(x1, x2)  =  U2_A(x1, x2)
U3_GA(x1, x2, x3, x4, x5)  =  U3_GA(x5)
NOATTACK_IN_GGG(x1, x2, x3)  =  NOATTACK_IN_GGG(x1, x2, x3)
U10_GGG(x1, x2, x3, x4, x5, x6)  =  U10_GGG(x1, x2, x3, x4, x6)
PERM_IN_GA(x1, x2)  =  PERM_IN_GA(x1)

We have to consider all (P,R,Pi)-chains

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
PiDP
          ↳ DependencyGraphProof

Pi DP problem:
The TRS P consists of the following rules:

QUEENS_IN_A(Y) → U1_A(Y, perm_in_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y))
QUEENS_IN_A(Y) → PERM_IN_GA(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y)
PERM_IN_GA(.(X, Y), .(V, Res)) → U3_GA(X, Y, V, Res, delete_in_aga(V, .(X, Y), Rest))
PERM_IN_GA(.(X, Y), .(V, Res)) → DELETE_IN_AGA(V, .(X, Y), Rest)
DELETE_IN_AGA(X, .(F, T), .(F, R)) → U5_AGA(X, F, T, R, delete_in_aga(X, T, R))
DELETE_IN_AGA(X, .(F, T), .(F, R)) → DELETE_IN_AGA(X, T, R)
U3_GA(X, Y, V, Res, delete_out_aga(V, .(X, Y), Rest)) → U4_GA(X, Y, V, Res, perm_in_ga(Rest, Res))
U3_GA(X, Y, V, Res, delete_out_aga(V, .(X, Y), Rest)) → PERM_IN_GA(Rest, Res)
U1_A(Y, perm_out_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y)) → U2_A(Y, safe_in_g(Y))
U1_A(Y, perm_out_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y)) → SAFE_IN_G(Y)
SAFE_IN_G(.(X, Y)) → U6_G(X, Y, noattack_in_ggg(X, Y, s(0)))
SAFE_IN_G(.(X, Y)) → NOATTACK_IN_GGG(X, Y, s(0))
NOATTACK_IN_GGG(X, .(F, T), N) → U8_GGG(X, F, T, N, notEq_in_gg(X, F))
NOATTACK_IN_GGG(X, .(F, T), N) → NOTEQ_IN_GG(X, F)
NOTEQ_IN_GG(s(X), s(Y)) → U15_GG(X, Y, notEq_in_gg(X, Y))
NOTEQ_IN_GG(s(X), s(Y)) → NOTEQ_IN_GG(X, Y)
U8_GGG(X, F, T, N, notEq_out_gg(X, F)) → U9_GGG(X, F, T, N, add_in_gga(F, N, FplusN))
U8_GGG(X, F, T, N, notEq_out_gg(X, F)) → ADD_IN_GGA(F, N, FplusN)
ADD_IN_GGA(s(X), Y, s(Z)) → U14_GGA(X, Y, Z, add_in_gga(X, Y, Z))
ADD_IN_GGA(s(X), Y, s(Z)) → ADD_IN_GGA(X, Y, Z)
U9_GGG(X, F, T, N, add_out_gga(F, N, FplusN)) → U10_GGG(X, F, T, N, FplusN, notEq_in_gg(X, FplusN))
U9_GGG(X, F, T, N, add_out_gga(F, N, FplusN)) → NOTEQ_IN_GG(X, FplusN)
U10_GGG(X, F, T, N, FplusN, notEq_out_gg(X, FplusN)) → U11_GGG(X, F, T, N, FplusN, add_in_gga(X, N, XplusN))
U10_GGG(X, F, T, N, FplusN, notEq_out_gg(X, FplusN)) → ADD_IN_GGA(X, N, XplusN)
U11_GGG(X, F, T, N, FplusN, add_out_gga(X, N, XplusN)) → U12_GGG(X, F, T, N, notEq_in_gg(F, XplusN))
U11_GGG(X, F, T, N, FplusN, add_out_gga(X, N, XplusN)) → NOTEQ_IN_GG(F, XplusN)
U12_GGG(X, F, T, N, notEq_out_gg(F, XplusN)) → U13_GGG(X, F, T, N, noattack_in_ggg(X, T, s(N)))
U12_GGG(X, F, T, N, notEq_out_gg(F, XplusN)) → NOATTACK_IN_GGG(X, T, s(N))
U6_G(X, Y, noattack_out_ggg(X, Y, s(0))) → U7_G(X, Y, safe_in_g(Y))
U6_G(X, Y, noattack_out_ggg(X, Y, s(0))) → SAFE_IN_G(Y)

The TRS R consists of the following rules:

queens_in_a(Y) → U1_a(Y, perm_in_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y))
perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(.(X, Y), .(V, Res)) → U3_ga(X, Y, V, Res, delete_in_aga(V, .(X, Y), Rest))
delete_in_aga(X, .(X, Y), Y) → delete_out_aga(X, .(X, Y), Y)
delete_in_aga(X, .(F, T), .(F, R)) → U5_aga(X, F, T, R, delete_in_aga(X, T, R))
U5_aga(X, F, T, R, delete_out_aga(X, T, R)) → delete_out_aga(X, .(F, T), .(F, R))
U3_ga(X, Y, V, Res, delete_out_aga(V, .(X, Y), Rest)) → U4_ga(X, Y, V, Res, perm_in_ga(Rest, Res))
U4_ga(X, Y, V, Res, perm_out_ga(Rest, Res)) → perm_out_ga(.(X, Y), .(V, Res))
U1_a(Y, perm_out_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y)) → U2_a(Y, safe_in_g(Y))
safe_in_g([]) → safe_out_g([])
safe_in_g(.(X, Y)) → U6_g(X, Y, noattack_in_ggg(X, Y, s(0)))
noattack_in_ggg(X, [], N) → noattack_out_ggg(X, [], N)
noattack_in_ggg(X, .(F, T), N) → U8_ggg(X, F, T, N, notEq_in_gg(X, F))
notEq_in_gg(0, s(X)) → notEq_out_gg(0, s(X))
notEq_in_gg(s(X), 0) → notEq_out_gg(s(X), 0)
notEq_in_gg(s(X), s(Y)) → U15_gg(X, Y, notEq_in_gg(X, Y))
U15_gg(X, Y, notEq_out_gg(X, Y)) → notEq_out_gg(s(X), s(Y))
U8_ggg(X, F, T, N, notEq_out_gg(X, F)) → U9_ggg(X, F, T, N, add_in_gga(F, N, FplusN))
add_in_gga(0, X, X) → add_out_gga(0, X, X)
add_in_gga(s(X), Y, s(Z)) → U14_gga(X, Y, Z, add_in_gga(X, Y, Z))
U14_gga(X, Y, Z, add_out_gga(X, Y, Z)) → add_out_gga(s(X), Y, s(Z))
U9_ggg(X, F, T, N, add_out_gga(F, N, FplusN)) → U10_ggg(X, F, T, N, FplusN, notEq_in_gg(X, FplusN))
U10_ggg(X, F, T, N, FplusN, notEq_out_gg(X, FplusN)) → U11_ggg(X, F, T, N, FplusN, add_in_gga(X, N, XplusN))
U11_ggg(X, F, T, N, FplusN, add_out_gga(X, N, XplusN)) → U12_ggg(X, F, T, N, notEq_in_gg(F, XplusN))
U12_ggg(X, F, T, N, notEq_out_gg(F, XplusN)) → U13_ggg(X, F, T, N, noattack_in_ggg(X, T, s(N)))
U13_ggg(X, F, T, N, noattack_out_ggg(X, T, s(N))) → noattack_out_ggg(X, .(F, T), N)
U6_g(X, Y, noattack_out_ggg(X, Y, s(0))) → U7_g(X, Y, safe_in_g(Y))
U7_g(X, Y, safe_out_g(Y)) → safe_out_g(.(X, Y))
U2_a(Y, safe_out_g(Y)) → queens_out_a(Y)

The argument filtering Pi contains the following mapping:
queens_in_a(x1)  =  queens_in_a
U1_a(x1, x2)  =  U1_a(x2)
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
[]  =  []
perm_out_ga(x1, x2)  =  perm_out_ga(x2)
.(x1, x2)  =  .(x1, x2)
U3_ga(x1, x2, x3, x4, x5)  =  U3_ga(x5)
delete_in_aga(x1, x2, x3)  =  delete_in_aga(x2)
delete_out_aga(x1, x2, x3)  =  delete_out_aga(x1, x3)
U5_aga(x1, x2, x3, x4, x5)  =  U5_aga(x2, x5)
U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x3, x5)
s(x1)  =  s(x1)
0  =  0
U2_a(x1, x2)  =  U2_a(x1, x2)
safe_in_g(x1)  =  safe_in_g(x1)
safe_out_g(x1)  =  safe_out_g
U6_g(x1, x2, x3)  =  U6_g(x2, x3)
noattack_in_ggg(x1, x2, x3)  =  noattack_in_ggg(x1, x2, x3)
noattack_out_ggg(x1, x2, x3)  =  noattack_out_ggg
U8_ggg(x1, x2, x3, x4, x5)  =  U8_ggg(x1, x2, x3, x4, x5)
notEq_in_gg(x1, x2)  =  notEq_in_gg(x1, x2)
notEq_out_gg(x1, x2)  =  notEq_out_gg
U15_gg(x1, x2, x3)  =  U15_gg(x3)
U9_ggg(x1, x2, x3, x4, x5)  =  U9_ggg(x1, x2, x3, x4, x5)
add_in_gga(x1, x2, x3)  =  add_in_gga(x1, x2)
add_out_gga(x1, x2, x3)  =  add_out_gga(x3)
U14_gga(x1, x2, x3, x4)  =  U14_gga(x4)
U10_ggg(x1, x2, x3, x4, x5, x6)  =  U10_ggg(x1, x2, x3, x4, x6)
U11_ggg(x1, x2, x3, x4, x5, x6)  =  U11_ggg(x1, x2, x3, x4, x6)
U12_ggg(x1, x2, x3, x4, x5)  =  U12_ggg(x1, x3, x4, x5)
U13_ggg(x1, x2, x3, x4, x5)  =  U13_ggg(x5)
U7_g(x1, x2, x3)  =  U7_g(x3)
queens_out_a(x1)  =  queens_out_a(x1)
SAFE_IN_G(x1)  =  SAFE_IN_G(x1)
U1_A(x1, x2)  =  U1_A(x2)
U4_GA(x1, x2, x3, x4, x5)  =  U4_GA(x3, x5)
U6_G(x1, x2, x3)  =  U6_G(x2, x3)
U12_GGG(x1, x2, x3, x4, x5)  =  U12_GGG(x1, x3, x4, x5)
U11_GGG(x1, x2, x3, x4, x5, x6)  =  U11_GGG(x1, x2, x3, x4, x6)
U7_G(x1, x2, x3)  =  U7_G(x3)
U13_GGG(x1, x2, x3, x4, x5)  =  U13_GGG(x5)
U8_GGG(x1, x2, x3, x4, x5)  =  U8_GGG(x1, x2, x3, x4, x5)
QUEENS_IN_A(x1)  =  QUEENS_IN_A
ADD_IN_GGA(x1, x2, x3)  =  ADD_IN_GGA(x1, x2)
U14_GGA(x1, x2, x3, x4)  =  U14_GGA(x4)
U9_GGG(x1, x2, x3, x4, x5)  =  U9_GGG(x1, x2, x3, x4, x5)
U5_AGA(x1, x2, x3, x4, x5)  =  U5_AGA(x2, x5)
NOTEQ_IN_GG(x1, x2)  =  NOTEQ_IN_GG(x1, x2)
U15_GG(x1, x2, x3)  =  U15_GG(x3)
DELETE_IN_AGA(x1, x2, x3)  =  DELETE_IN_AGA(x2)
U2_A(x1, x2)  =  U2_A(x1, x2)
U3_GA(x1, x2, x3, x4, x5)  =  U3_GA(x5)
NOATTACK_IN_GGG(x1, x2, x3)  =  NOATTACK_IN_GGG(x1, x2, x3)
U10_GGG(x1, x2, x3, x4, x5, x6)  =  U10_GGG(x1, x2, x3, x4, x6)
PERM_IN_GA(x1, x2)  =  PERM_IN_GA(x1)

We have to consider all (P,R,Pi)-chains
The approximation of the Dependency Graph [30] contains 6 SCCs with 17 less nodes.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
PiDP
                ↳ UsableRulesProof
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

ADD_IN_GGA(s(X), Y, s(Z)) → ADD_IN_GGA(X, Y, Z)

The TRS R consists of the following rules:

queens_in_a(Y) → U1_a(Y, perm_in_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y))
perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(.(X, Y), .(V, Res)) → U3_ga(X, Y, V, Res, delete_in_aga(V, .(X, Y), Rest))
delete_in_aga(X, .(X, Y), Y) → delete_out_aga(X, .(X, Y), Y)
delete_in_aga(X, .(F, T), .(F, R)) → U5_aga(X, F, T, R, delete_in_aga(X, T, R))
U5_aga(X, F, T, R, delete_out_aga(X, T, R)) → delete_out_aga(X, .(F, T), .(F, R))
U3_ga(X, Y, V, Res, delete_out_aga(V, .(X, Y), Rest)) → U4_ga(X, Y, V, Res, perm_in_ga(Rest, Res))
U4_ga(X, Y, V, Res, perm_out_ga(Rest, Res)) → perm_out_ga(.(X, Y), .(V, Res))
U1_a(Y, perm_out_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y)) → U2_a(Y, safe_in_g(Y))
safe_in_g([]) → safe_out_g([])
safe_in_g(.(X, Y)) → U6_g(X, Y, noattack_in_ggg(X, Y, s(0)))
noattack_in_ggg(X, [], N) → noattack_out_ggg(X, [], N)
noattack_in_ggg(X, .(F, T), N) → U8_ggg(X, F, T, N, notEq_in_gg(X, F))
notEq_in_gg(0, s(X)) → notEq_out_gg(0, s(X))
notEq_in_gg(s(X), 0) → notEq_out_gg(s(X), 0)
notEq_in_gg(s(X), s(Y)) → U15_gg(X, Y, notEq_in_gg(X, Y))
U15_gg(X, Y, notEq_out_gg(X, Y)) → notEq_out_gg(s(X), s(Y))
U8_ggg(X, F, T, N, notEq_out_gg(X, F)) → U9_ggg(X, F, T, N, add_in_gga(F, N, FplusN))
add_in_gga(0, X, X) → add_out_gga(0, X, X)
add_in_gga(s(X), Y, s(Z)) → U14_gga(X, Y, Z, add_in_gga(X, Y, Z))
U14_gga(X, Y, Z, add_out_gga(X, Y, Z)) → add_out_gga(s(X), Y, s(Z))
U9_ggg(X, F, T, N, add_out_gga(F, N, FplusN)) → U10_ggg(X, F, T, N, FplusN, notEq_in_gg(X, FplusN))
U10_ggg(X, F, T, N, FplusN, notEq_out_gg(X, FplusN)) → U11_ggg(X, F, T, N, FplusN, add_in_gga(X, N, XplusN))
U11_ggg(X, F, T, N, FplusN, add_out_gga(X, N, XplusN)) → U12_ggg(X, F, T, N, notEq_in_gg(F, XplusN))
U12_ggg(X, F, T, N, notEq_out_gg(F, XplusN)) → U13_ggg(X, F, T, N, noattack_in_ggg(X, T, s(N)))
U13_ggg(X, F, T, N, noattack_out_ggg(X, T, s(N))) → noattack_out_ggg(X, .(F, T), N)
U6_g(X, Y, noattack_out_ggg(X, Y, s(0))) → U7_g(X, Y, safe_in_g(Y))
U7_g(X, Y, safe_out_g(Y)) → safe_out_g(.(X, Y))
U2_a(Y, safe_out_g(Y)) → queens_out_a(Y)

The argument filtering Pi contains the following mapping:
queens_in_a(x1)  =  queens_in_a
U1_a(x1, x2)  =  U1_a(x2)
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
[]  =  []
perm_out_ga(x1, x2)  =  perm_out_ga(x2)
.(x1, x2)  =  .(x1, x2)
U3_ga(x1, x2, x3, x4, x5)  =  U3_ga(x5)
delete_in_aga(x1, x2, x3)  =  delete_in_aga(x2)
delete_out_aga(x1, x2, x3)  =  delete_out_aga(x1, x3)
U5_aga(x1, x2, x3, x4, x5)  =  U5_aga(x2, x5)
U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x3, x5)
s(x1)  =  s(x1)
0  =  0
U2_a(x1, x2)  =  U2_a(x1, x2)
safe_in_g(x1)  =  safe_in_g(x1)
safe_out_g(x1)  =  safe_out_g
U6_g(x1, x2, x3)  =  U6_g(x2, x3)
noattack_in_ggg(x1, x2, x3)  =  noattack_in_ggg(x1, x2, x3)
noattack_out_ggg(x1, x2, x3)  =  noattack_out_ggg
U8_ggg(x1, x2, x3, x4, x5)  =  U8_ggg(x1, x2, x3, x4, x5)
notEq_in_gg(x1, x2)  =  notEq_in_gg(x1, x2)
notEq_out_gg(x1, x2)  =  notEq_out_gg
U15_gg(x1, x2, x3)  =  U15_gg(x3)
U9_ggg(x1, x2, x3, x4, x5)  =  U9_ggg(x1, x2, x3, x4, x5)
add_in_gga(x1, x2, x3)  =  add_in_gga(x1, x2)
add_out_gga(x1, x2, x3)  =  add_out_gga(x3)
U14_gga(x1, x2, x3, x4)  =  U14_gga(x4)
U10_ggg(x1, x2, x3, x4, x5, x6)  =  U10_ggg(x1, x2, x3, x4, x6)
U11_ggg(x1, x2, x3, x4, x5, x6)  =  U11_ggg(x1, x2, x3, x4, x6)
U12_ggg(x1, x2, x3, x4, x5)  =  U12_ggg(x1, x3, x4, x5)
U13_ggg(x1, x2, x3, x4, x5)  =  U13_ggg(x5)
U7_g(x1, x2, x3)  =  U7_g(x3)
queens_out_a(x1)  =  queens_out_a(x1)
ADD_IN_GGA(x1, x2, x3)  =  ADD_IN_GGA(x1, x2)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

ADD_IN_GGA(s(X), Y, s(Z)) → ADD_IN_GGA(X, Y, Z)

R is empty.
The argument filtering Pi contains the following mapping:
s(x1)  =  s(x1)
ADD_IN_GGA(x1, x2, x3)  =  ADD_IN_GGA(x1, x2)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ QDPSizeChangeProof
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP

Q DP problem:
The TRS P consists of the following rules:

ADD_IN_GGA(s(X), Y) → ADD_IN_GGA(X, Y)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
PiDP
                ↳ UsableRulesProof
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

NOTEQ_IN_GG(s(X), s(Y)) → NOTEQ_IN_GG(X, Y)

The TRS R consists of the following rules:

queens_in_a(Y) → U1_a(Y, perm_in_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y))
perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(.(X, Y), .(V, Res)) → U3_ga(X, Y, V, Res, delete_in_aga(V, .(X, Y), Rest))
delete_in_aga(X, .(X, Y), Y) → delete_out_aga(X, .(X, Y), Y)
delete_in_aga(X, .(F, T), .(F, R)) → U5_aga(X, F, T, R, delete_in_aga(X, T, R))
U5_aga(X, F, T, R, delete_out_aga(X, T, R)) → delete_out_aga(X, .(F, T), .(F, R))
U3_ga(X, Y, V, Res, delete_out_aga(V, .(X, Y), Rest)) → U4_ga(X, Y, V, Res, perm_in_ga(Rest, Res))
U4_ga(X, Y, V, Res, perm_out_ga(Rest, Res)) → perm_out_ga(.(X, Y), .(V, Res))
U1_a(Y, perm_out_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y)) → U2_a(Y, safe_in_g(Y))
safe_in_g([]) → safe_out_g([])
safe_in_g(.(X, Y)) → U6_g(X, Y, noattack_in_ggg(X, Y, s(0)))
noattack_in_ggg(X, [], N) → noattack_out_ggg(X, [], N)
noattack_in_ggg(X, .(F, T), N) → U8_ggg(X, F, T, N, notEq_in_gg(X, F))
notEq_in_gg(0, s(X)) → notEq_out_gg(0, s(X))
notEq_in_gg(s(X), 0) → notEq_out_gg(s(X), 0)
notEq_in_gg(s(X), s(Y)) → U15_gg(X, Y, notEq_in_gg(X, Y))
U15_gg(X, Y, notEq_out_gg(X, Y)) → notEq_out_gg(s(X), s(Y))
U8_ggg(X, F, T, N, notEq_out_gg(X, F)) → U9_ggg(X, F, T, N, add_in_gga(F, N, FplusN))
add_in_gga(0, X, X) → add_out_gga(0, X, X)
add_in_gga(s(X), Y, s(Z)) → U14_gga(X, Y, Z, add_in_gga(X, Y, Z))
U14_gga(X, Y, Z, add_out_gga(X, Y, Z)) → add_out_gga(s(X), Y, s(Z))
U9_ggg(X, F, T, N, add_out_gga(F, N, FplusN)) → U10_ggg(X, F, T, N, FplusN, notEq_in_gg(X, FplusN))
U10_ggg(X, F, T, N, FplusN, notEq_out_gg(X, FplusN)) → U11_ggg(X, F, T, N, FplusN, add_in_gga(X, N, XplusN))
U11_ggg(X, F, T, N, FplusN, add_out_gga(X, N, XplusN)) → U12_ggg(X, F, T, N, notEq_in_gg(F, XplusN))
U12_ggg(X, F, T, N, notEq_out_gg(F, XplusN)) → U13_ggg(X, F, T, N, noattack_in_ggg(X, T, s(N)))
U13_ggg(X, F, T, N, noattack_out_ggg(X, T, s(N))) → noattack_out_ggg(X, .(F, T), N)
U6_g(X, Y, noattack_out_ggg(X, Y, s(0))) → U7_g(X, Y, safe_in_g(Y))
U7_g(X, Y, safe_out_g(Y)) → safe_out_g(.(X, Y))
U2_a(Y, safe_out_g(Y)) → queens_out_a(Y)

The argument filtering Pi contains the following mapping:
queens_in_a(x1)  =  queens_in_a
U1_a(x1, x2)  =  U1_a(x2)
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
[]  =  []
perm_out_ga(x1, x2)  =  perm_out_ga(x2)
.(x1, x2)  =  .(x1, x2)
U3_ga(x1, x2, x3, x4, x5)  =  U3_ga(x5)
delete_in_aga(x1, x2, x3)  =  delete_in_aga(x2)
delete_out_aga(x1, x2, x3)  =  delete_out_aga(x1, x3)
U5_aga(x1, x2, x3, x4, x5)  =  U5_aga(x2, x5)
U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x3, x5)
s(x1)  =  s(x1)
0  =  0
U2_a(x1, x2)  =  U2_a(x1, x2)
safe_in_g(x1)  =  safe_in_g(x1)
safe_out_g(x1)  =  safe_out_g
U6_g(x1, x2, x3)  =  U6_g(x2, x3)
noattack_in_ggg(x1, x2, x3)  =  noattack_in_ggg(x1, x2, x3)
noattack_out_ggg(x1, x2, x3)  =  noattack_out_ggg
U8_ggg(x1, x2, x3, x4, x5)  =  U8_ggg(x1, x2, x3, x4, x5)
notEq_in_gg(x1, x2)  =  notEq_in_gg(x1, x2)
notEq_out_gg(x1, x2)  =  notEq_out_gg
U15_gg(x1, x2, x3)  =  U15_gg(x3)
U9_ggg(x1, x2, x3, x4, x5)  =  U9_ggg(x1, x2, x3, x4, x5)
add_in_gga(x1, x2, x3)  =  add_in_gga(x1, x2)
add_out_gga(x1, x2, x3)  =  add_out_gga(x3)
U14_gga(x1, x2, x3, x4)  =  U14_gga(x4)
U10_ggg(x1, x2, x3, x4, x5, x6)  =  U10_ggg(x1, x2, x3, x4, x6)
U11_ggg(x1, x2, x3, x4, x5, x6)  =  U11_ggg(x1, x2, x3, x4, x6)
U12_ggg(x1, x2, x3, x4, x5)  =  U12_ggg(x1, x3, x4, x5)
U13_ggg(x1, x2, x3, x4, x5)  =  U13_ggg(x5)
U7_g(x1, x2, x3)  =  U7_g(x3)
queens_out_a(x1)  =  queens_out_a(x1)
NOTEQ_IN_GG(x1, x2)  =  NOTEQ_IN_GG(x1, x2)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

NOTEQ_IN_GG(s(X), s(Y)) → NOTEQ_IN_GG(X, Y)

R is empty.
Pi is empty.
We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ QDPSizeChangeProof
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP

Q DP problem:
The TRS P consists of the following rules:

NOTEQ_IN_GG(s(X), s(Y)) → NOTEQ_IN_GG(X, Y)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
PiDP
                ↳ UsableRulesProof
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

U11_GGG(X, F, T, N, FplusN, add_out_gga(X, N, XplusN)) → U12_GGG(X, F, T, N, notEq_in_gg(F, XplusN))
U8_GGG(X, F, T, N, notEq_out_gg(X, F)) → U9_GGG(X, F, T, N, add_in_gga(F, N, FplusN))
NOATTACK_IN_GGG(X, .(F, T), N) → U8_GGG(X, F, T, N, notEq_in_gg(X, F))
U12_GGG(X, F, T, N, notEq_out_gg(F, XplusN)) → NOATTACK_IN_GGG(X, T, s(N))
U10_GGG(X, F, T, N, FplusN, notEq_out_gg(X, FplusN)) → U11_GGG(X, F, T, N, FplusN, add_in_gga(X, N, XplusN))
U9_GGG(X, F, T, N, add_out_gga(F, N, FplusN)) → U10_GGG(X, F, T, N, FplusN, notEq_in_gg(X, FplusN))

The TRS R consists of the following rules:

queens_in_a(Y) → U1_a(Y, perm_in_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y))
perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(.(X, Y), .(V, Res)) → U3_ga(X, Y, V, Res, delete_in_aga(V, .(X, Y), Rest))
delete_in_aga(X, .(X, Y), Y) → delete_out_aga(X, .(X, Y), Y)
delete_in_aga(X, .(F, T), .(F, R)) → U5_aga(X, F, T, R, delete_in_aga(X, T, R))
U5_aga(X, F, T, R, delete_out_aga(X, T, R)) → delete_out_aga(X, .(F, T), .(F, R))
U3_ga(X, Y, V, Res, delete_out_aga(V, .(X, Y), Rest)) → U4_ga(X, Y, V, Res, perm_in_ga(Rest, Res))
U4_ga(X, Y, V, Res, perm_out_ga(Rest, Res)) → perm_out_ga(.(X, Y), .(V, Res))
U1_a(Y, perm_out_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y)) → U2_a(Y, safe_in_g(Y))
safe_in_g([]) → safe_out_g([])
safe_in_g(.(X, Y)) → U6_g(X, Y, noattack_in_ggg(X, Y, s(0)))
noattack_in_ggg(X, [], N) → noattack_out_ggg(X, [], N)
noattack_in_ggg(X, .(F, T), N) → U8_ggg(X, F, T, N, notEq_in_gg(X, F))
notEq_in_gg(0, s(X)) → notEq_out_gg(0, s(X))
notEq_in_gg(s(X), 0) → notEq_out_gg(s(X), 0)
notEq_in_gg(s(X), s(Y)) → U15_gg(X, Y, notEq_in_gg(X, Y))
U15_gg(X, Y, notEq_out_gg(X, Y)) → notEq_out_gg(s(X), s(Y))
U8_ggg(X, F, T, N, notEq_out_gg(X, F)) → U9_ggg(X, F, T, N, add_in_gga(F, N, FplusN))
add_in_gga(0, X, X) → add_out_gga(0, X, X)
add_in_gga(s(X), Y, s(Z)) → U14_gga(X, Y, Z, add_in_gga(X, Y, Z))
U14_gga(X, Y, Z, add_out_gga(X, Y, Z)) → add_out_gga(s(X), Y, s(Z))
U9_ggg(X, F, T, N, add_out_gga(F, N, FplusN)) → U10_ggg(X, F, T, N, FplusN, notEq_in_gg(X, FplusN))
U10_ggg(X, F, T, N, FplusN, notEq_out_gg(X, FplusN)) → U11_ggg(X, F, T, N, FplusN, add_in_gga(X, N, XplusN))
U11_ggg(X, F, T, N, FplusN, add_out_gga(X, N, XplusN)) → U12_ggg(X, F, T, N, notEq_in_gg(F, XplusN))
U12_ggg(X, F, T, N, notEq_out_gg(F, XplusN)) → U13_ggg(X, F, T, N, noattack_in_ggg(X, T, s(N)))
U13_ggg(X, F, T, N, noattack_out_ggg(X, T, s(N))) → noattack_out_ggg(X, .(F, T), N)
U6_g(X, Y, noattack_out_ggg(X, Y, s(0))) → U7_g(X, Y, safe_in_g(Y))
U7_g(X, Y, safe_out_g(Y)) → safe_out_g(.(X, Y))
U2_a(Y, safe_out_g(Y)) → queens_out_a(Y)

The argument filtering Pi contains the following mapping:
queens_in_a(x1)  =  queens_in_a
U1_a(x1, x2)  =  U1_a(x2)
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
[]  =  []
perm_out_ga(x1, x2)  =  perm_out_ga(x2)
.(x1, x2)  =  .(x1, x2)
U3_ga(x1, x2, x3, x4, x5)  =  U3_ga(x5)
delete_in_aga(x1, x2, x3)  =  delete_in_aga(x2)
delete_out_aga(x1, x2, x3)  =  delete_out_aga(x1, x3)
U5_aga(x1, x2, x3, x4, x5)  =  U5_aga(x2, x5)
U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x3, x5)
s(x1)  =  s(x1)
0  =  0
U2_a(x1, x2)  =  U2_a(x1, x2)
safe_in_g(x1)  =  safe_in_g(x1)
safe_out_g(x1)  =  safe_out_g
U6_g(x1, x2, x3)  =  U6_g(x2, x3)
noattack_in_ggg(x1, x2, x3)  =  noattack_in_ggg(x1, x2, x3)
noattack_out_ggg(x1, x2, x3)  =  noattack_out_ggg
U8_ggg(x1, x2, x3, x4, x5)  =  U8_ggg(x1, x2, x3, x4, x5)
notEq_in_gg(x1, x2)  =  notEq_in_gg(x1, x2)
notEq_out_gg(x1, x2)  =  notEq_out_gg
U15_gg(x1, x2, x3)  =  U15_gg(x3)
U9_ggg(x1, x2, x3, x4, x5)  =  U9_ggg(x1, x2, x3, x4, x5)
add_in_gga(x1, x2, x3)  =  add_in_gga(x1, x2)
add_out_gga(x1, x2, x3)  =  add_out_gga(x3)
U14_gga(x1, x2, x3, x4)  =  U14_gga(x4)
U10_ggg(x1, x2, x3, x4, x5, x6)  =  U10_ggg(x1, x2, x3, x4, x6)
U11_ggg(x1, x2, x3, x4, x5, x6)  =  U11_ggg(x1, x2, x3, x4, x6)
U12_ggg(x1, x2, x3, x4, x5)  =  U12_ggg(x1, x3, x4, x5)
U13_ggg(x1, x2, x3, x4, x5)  =  U13_ggg(x5)
U7_g(x1, x2, x3)  =  U7_g(x3)
queens_out_a(x1)  =  queens_out_a(x1)
U12_GGG(x1, x2, x3, x4, x5)  =  U12_GGG(x1, x3, x4, x5)
U11_GGG(x1, x2, x3, x4, x5, x6)  =  U11_GGG(x1, x2, x3, x4, x6)
U8_GGG(x1, x2, x3, x4, x5)  =  U8_GGG(x1, x2, x3, x4, x5)
U9_GGG(x1, x2, x3, x4, x5)  =  U9_GGG(x1, x2, x3, x4, x5)
NOATTACK_IN_GGG(x1, x2, x3)  =  NOATTACK_IN_GGG(x1, x2, x3)
U10_GGG(x1, x2, x3, x4, x5, x6)  =  U10_GGG(x1, x2, x3, x4, x6)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

U11_GGG(X, F, T, N, FplusN, add_out_gga(X, N, XplusN)) → U12_GGG(X, F, T, N, notEq_in_gg(F, XplusN))
U8_GGG(X, F, T, N, notEq_out_gg(X, F)) → U9_GGG(X, F, T, N, add_in_gga(F, N, FplusN))
NOATTACK_IN_GGG(X, .(F, T), N) → U8_GGG(X, F, T, N, notEq_in_gg(X, F))
U12_GGG(X, F, T, N, notEq_out_gg(F, XplusN)) → NOATTACK_IN_GGG(X, T, s(N))
U10_GGG(X, F, T, N, FplusN, notEq_out_gg(X, FplusN)) → U11_GGG(X, F, T, N, FplusN, add_in_gga(X, N, XplusN))
U9_GGG(X, F, T, N, add_out_gga(F, N, FplusN)) → U10_GGG(X, F, T, N, FplusN, notEq_in_gg(X, FplusN))

The TRS R consists of the following rules:

notEq_in_gg(0, s(X)) → notEq_out_gg(0, s(X))
notEq_in_gg(s(X), 0) → notEq_out_gg(s(X), 0)
notEq_in_gg(s(X), s(Y)) → U15_gg(X, Y, notEq_in_gg(X, Y))
add_in_gga(0, X, X) → add_out_gga(0, X, X)
add_in_gga(s(X), Y, s(Z)) → U14_gga(X, Y, Z, add_in_gga(X, Y, Z))
U15_gg(X, Y, notEq_out_gg(X, Y)) → notEq_out_gg(s(X), s(Y))
U14_gga(X, Y, Z, add_out_gga(X, Y, Z)) → add_out_gga(s(X), Y, s(Z))

The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x1, x2)
s(x1)  =  s(x1)
0  =  0
notEq_in_gg(x1, x2)  =  notEq_in_gg(x1, x2)
notEq_out_gg(x1, x2)  =  notEq_out_gg
U15_gg(x1, x2, x3)  =  U15_gg(x3)
add_in_gga(x1, x2, x3)  =  add_in_gga(x1, x2)
add_out_gga(x1, x2, x3)  =  add_out_gga(x3)
U14_gga(x1, x2, x3, x4)  =  U14_gga(x4)
U12_GGG(x1, x2, x3, x4, x5)  =  U12_GGG(x1, x3, x4, x5)
U11_GGG(x1, x2, x3, x4, x5, x6)  =  U11_GGG(x1, x2, x3, x4, x6)
U8_GGG(x1, x2, x3, x4, x5)  =  U8_GGG(x1, x2, x3, x4, x5)
U9_GGG(x1, x2, x3, x4, x5)  =  U9_GGG(x1, x2, x3, x4, x5)
NOATTACK_IN_GGG(x1, x2, x3)  =  NOATTACK_IN_GGG(x1, x2, x3)
U10_GGG(x1, x2, x3, x4, x5, x6)  =  U10_GGG(x1, x2, x3, x4, x6)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ QDPSizeChangeProof
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP

Q DP problem:
The TRS P consists of the following rules:

U12_GGG(X, T, N, notEq_out_gg) → NOATTACK_IN_GGG(X, T, s(N))
U11_GGG(X, F, T, N, add_out_gga(XplusN)) → U12_GGG(X, T, N, notEq_in_gg(F, XplusN))
NOATTACK_IN_GGG(X, .(F, T), N) → U8_GGG(X, F, T, N, notEq_in_gg(X, F))
U8_GGG(X, F, T, N, notEq_out_gg) → U9_GGG(X, F, T, N, add_in_gga(F, N))
U9_GGG(X, F, T, N, add_out_gga(FplusN)) → U10_GGG(X, F, T, N, notEq_in_gg(X, FplusN))
U10_GGG(X, F, T, N, notEq_out_gg) → U11_GGG(X, F, T, N, add_in_gga(X, N))

The TRS R consists of the following rules:

notEq_in_gg(0, s(X)) → notEq_out_gg
notEq_in_gg(s(X), 0) → notEq_out_gg
notEq_in_gg(s(X), s(Y)) → U15_gg(notEq_in_gg(X, Y))
add_in_gga(0, X) → add_out_gga(X)
add_in_gga(s(X), Y) → U14_gga(add_in_gga(X, Y))
U15_gg(notEq_out_gg) → notEq_out_gg
U14_gga(add_out_gga(Z)) → add_out_gga(s(Z))

The set Q consists of the following terms:

notEq_in_gg(x0, x1)
add_in_gga(x0, x1)
U15_gg(x0)
U14_gga(x0)

We have to consider all (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
PiDP
                ↳ UsableRulesProof
              ↳ PiDP
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

U6_G(X, Y, noattack_out_ggg(X, Y, s(0))) → SAFE_IN_G(Y)
SAFE_IN_G(.(X, Y)) → U6_G(X, Y, noattack_in_ggg(X, Y, s(0)))

The TRS R consists of the following rules:

queens_in_a(Y) → U1_a(Y, perm_in_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y))
perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(.(X, Y), .(V, Res)) → U3_ga(X, Y, V, Res, delete_in_aga(V, .(X, Y), Rest))
delete_in_aga(X, .(X, Y), Y) → delete_out_aga(X, .(X, Y), Y)
delete_in_aga(X, .(F, T), .(F, R)) → U5_aga(X, F, T, R, delete_in_aga(X, T, R))
U5_aga(X, F, T, R, delete_out_aga(X, T, R)) → delete_out_aga(X, .(F, T), .(F, R))
U3_ga(X, Y, V, Res, delete_out_aga(V, .(X, Y), Rest)) → U4_ga(X, Y, V, Res, perm_in_ga(Rest, Res))
U4_ga(X, Y, V, Res, perm_out_ga(Rest, Res)) → perm_out_ga(.(X, Y), .(V, Res))
U1_a(Y, perm_out_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y)) → U2_a(Y, safe_in_g(Y))
safe_in_g([]) → safe_out_g([])
safe_in_g(.(X, Y)) → U6_g(X, Y, noattack_in_ggg(X, Y, s(0)))
noattack_in_ggg(X, [], N) → noattack_out_ggg(X, [], N)
noattack_in_ggg(X, .(F, T), N) → U8_ggg(X, F, T, N, notEq_in_gg(X, F))
notEq_in_gg(0, s(X)) → notEq_out_gg(0, s(X))
notEq_in_gg(s(X), 0) → notEq_out_gg(s(X), 0)
notEq_in_gg(s(X), s(Y)) → U15_gg(X, Y, notEq_in_gg(X, Y))
U15_gg(X, Y, notEq_out_gg(X, Y)) → notEq_out_gg(s(X), s(Y))
U8_ggg(X, F, T, N, notEq_out_gg(X, F)) → U9_ggg(X, F, T, N, add_in_gga(F, N, FplusN))
add_in_gga(0, X, X) → add_out_gga(0, X, X)
add_in_gga(s(X), Y, s(Z)) → U14_gga(X, Y, Z, add_in_gga(X, Y, Z))
U14_gga(X, Y, Z, add_out_gga(X, Y, Z)) → add_out_gga(s(X), Y, s(Z))
U9_ggg(X, F, T, N, add_out_gga(F, N, FplusN)) → U10_ggg(X, F, T, N, FplusN, notEq_in_gg(X, FplusN))
U10_ggg(X, F, T, N, FplusN, notEq_out_gg(X, FplusN)) → U11_ggg(X, F, T, N, FplusN, add_in_gga(X, N, XplusN))
U11_ggg(X, F, T, N, FplusN, add_out_gga(X, N, XplusN)) → U12_ggg(X, F, T, N, notEq_in_gg(F, XplusN))
U12_ggg(X, F, T, N, notEq_out_gg(F, XplusN)) → U13_ggg(X, F, T, N, noattack_in_ggg(X, T, s(N)))
U13_ggg(X, F, T, N, noattack_out_ggg(X, T, s(N))) → noattack_out_ggg(X, .(F, T), N)
U6_g(X, Y, noattack_out_ggg(X, Y, s(0))) → U7_g(X, Y, safe_in_g(Y))
U7_g(X, Y, safe_out_g(Y)) → safe_out_g(.(X, Y))
U2_a(Y, safe_out_g(Y)) → queens_out_a(Y)

The argument filtering Pi contains the following mapping:
queens_in_a(x1)  =  queens_in_a
U1_a(x1, x2)  =  U1_a(x2)
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
[]  =  []
perm_out_ga(x1, x2)  =  perm_out_ga(x2)
.(x1, x2)  =  .(x1, x2)
U3_ga(x1, x2, x3, x4, x5)  =  U3_ga(x5)
delete_in_aga(x1, x2, x3)  =  delete_in_aga(x2)
delete_out_aga(x1, x2, x3)  =  delete_out_aga(x1, x3)
U5_aga(x1, x2, x3, x4, x5)  =  U5_aga(x2, x5)
U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x3, x5)
s(x1)  =  s(x1)
0  =  0
U2_a(x1, x2)  =  U2_a(x1, x2)
safe_in_g(x1)  =  safe_in_g(x1)
safe_out_g(x1)  =  safe_out_g
U6_g(x1, x2, x3)  =  U6_g(x2, x3)
noattack_in_ggg(x1, x2, x3)  =  noattack_in_ggg(x1, x2, x3)
noattack_out_ggg(x1, x2, x3)  =  noattack_out_ggg
U8_ggg(x1, x2, x3, x4, x5)  =  U8_ggg(x1, x2, x3, x4, x5)
notEq_in_gg(x1, x2)  =  notEq_in_gg(x1, x2)
notEq_out_gg(x1, x2)  =  notEq_out_gg
U15_gg(x1, x2, x3)  =  U15_gg(x3)
U9_ggg(x1, x2, x3, x4, x5)  =  U9_ggg(x1, x2, x3, x4, x5)
add_in_gga(x1, x2, x3)  =  add_in_gga(x1, x2)
add_out_gga(x1, x2, x3)  =  add_out_gga(x3)
U14_gga(x1, x2, x3, x4)  =  U14_gga(x4)
U10_ggg(x1, x2, x3, x4, x5, x6)  =  U10_ggg(x1, x2, x3, x4, x6)
U11_ggg(x1, x2, x3, x4, x5, x6)  =  U11_ggg(x1, x2, x3, x4, x6)
U12_ggg(x1, x2, x3, x4, x5)  =  U12_ggg(x1, x3, x4, x5)
U13_ggg(x1, x2, x3, x4, x5)  =  U13_ggg(x5)
U7_g(x1, x2, x3)  =  U7_g(x3)
queens_out_a(x1)  =  queens_out_a(x1)
SAFE_IN_G(x1)  =  SAFE_IN_G(x1)
U6_G(x1, x2, x3)  =  U6_G(x2, x3)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

U6_G(X, Y, noattack_out_ggg(X, Y, s(0))) → SAFE_IN_G(Y)
SAFE_IN_G(.(X, Y)) → U6_G(X, Y, noattack_in_ggg(X, Y, s(0)))

The TRS R consists of the following rules:

noattack_in_ggg(X, [], N) → noattack_out_ggg(X, [], N)
noattack_in_ggg(X, .(F, T), N) → U8_ggg(X, F, T, N, notEq_in_gg(X, F))
U8_ggg(X, F, T, N, notEq_out_gg(X, F)) → U9_ggg(X, F, T, N, add_in_gga(F, N, FplusN))
notEq_in_gg(0, s(X)) → notEq_out_gg(0, s(X))
notEq_in_gg(s(X), 0) → notEq_out_gg(s(X), 0)
notEq_in_gg(s(X), s(Y)) → U15_gg(X, Y, notEq_in_gg(X, Y))
U9_ggg(X, F, T, N, add_out_gga(F, N, FplusN)) → U10_ggg(X, F, T, N, FplusN, notEq_in_gg(X, FplusN))
U15_gg(X, Y, notEq_out_gg(X, Y)) → notEq_out_gg(s(X), s(Y))
add_in_gga(0, X, X) → add_out_gga(0, X, X)
add_in_gga(s(X), Y, s(Z)) → U14_gga(X, Y, Z, add_in_gga(X, Y, Z))
U10_ggg(X, F, T, N, FplusN, notEq_out_gg(X, FplusN)) → U11_ggg(X, F, T, N, FplusN, add_in_gga(X, N, XplusN))
U14_gga(X, Y, Z, add_out_gga(X, Y, Z)) → add_out_gga(s(X), Y, s(Z))
U11_ggg(X, F, T, N, FplusN, add_out_gga(X, N, XplusN)) → U12_ggg(X, F, T, N, notEq_in_gg(F, XplusN))
U12_ggg(X, F, T, N, notEq_out_gg(F, XplusN)) → U13_ggg(X, F, T, N, noattack_in_ggg(X, T, s(N)))
U13_ggg(X, F, T, N, noattack_out_ggg(X, T, s(N))) → noattack_out_ggg(X, .(F, T), N)

The argument filtering Pi contains the following mapping:
[]  =  []
.(x1, x2)  =  .(x1, x2)
s(x1)  =  s(x1)
0  =  0
noattack_in_ggg(x1, x2, x3)  =  noattack_in_ggg(x1, x2, x3)
noattack_out_ggg(x1, x2, x3)  =  noattack_out_ggg
U8_ggg(x1, x2, x3, x4, x5)  =  U8_ggg(x1, x2, x3, x4, x5)
notEq_in_gg(x1, x2)  =  notEq_in_gg(x1, x2)
notEq_out_gg(x1, x2)  =  notEq_out_gg
U15_gg(x1, x2, x3)  =  U15_gg(x3)
U9_ggg(x1, x2, x3, x4, x5)  =  U9_ggg(x1, x2, x3, x4, x5)
add_in_gga(x1, x2, x3)  =  add_in_gga(x1, x2)
add_out_gga(x1, x2, x3)  =  add_out_gga(x3)
U14_gga(x1, x2, x3, x4)  =  U14_gga(x4)
U10_ggg(x1, x2, x3, x4, x5, x6)  =  U10_ggg(x1, x2, x3, x4, x6)
U11_ggg(x1, x2, x3, x4, x5, x6)  =  U11_ggg(x1, x2, x3, x4, x6)
U12_ggg(x1, x2, x3, x4, x5)  =  U12_ggg(x1, x3, x4, x5)
U13_ggg(x1, x2, x3, x4, x5)  =  U13_ggg(x5)
SAFE_IN_G(x1)  =  SAFE_IN_G(x1)
U6_G(x1, x2, x3)  =  U6_G(x2, x3)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ QDPSizeChangeProof
              ↳ PiDP
              ↳ PiDP

Q DP problem:
The TRS P consists of the following rules:

SAFE_IN_G(.(X, Y)) → U6_G(Y, noattack_in_ggg(X, Y, s(0)))
U6_G(Y, noattack_out_ggg) → SAFE_IN_G(Y)

The TRS R consists of the following rules:

noattack_in_ggg(X, [], N) → noattack_out_ggg
noattack_in_ggg(X, .(F, T), N) → U8_ggg(X, F, T, N, notEq_in_gg(X, F))
U8_ggg(X, F, T, N, notEq_out_gg) → U9_ggg(X, F, T, N, add_in_gga(F, N))
notEq_in_gg(0, s(X)) → notEq_out_gg
notEq_in_gg(s(X), 0) → notEq_out_gg
notEq_in_gg(s(X), s(Y)) → U15_gg(notEq_in_gg(X, Y))
U9_ggg(X, F, T, N, add_out_gga(FplusN)) → U10_ggg(X, F, T, N, notEq_in_gg(X, FplusN))
U15_gg(notEq_out_gg) → notEq_out_gg
add_in_gga(0, X) → add_out_gga(X)
add_in_gga(s(X), Y) → U14_gga(add_in_gga(X, Y))
U10_ggg(X, F, T, N, notEq_out_gg) → U11_ggg(X, F, T, N, add_in_gga(X, N))
U14_gga(add_out_gga(Z)) → add_out_gga(s(Z))
U11_ggg(X, F, T, N, add_out_gga(XplusN)) → U12_ggg(X, T, N, notEq_in_gg(F, XplusN))
U12_ggg(X, T, N, notEq_out_gg) → U13_ggg(noattack_in_ggg(X, T, s(N)))
U13_ggg(noattack_out_ggg) → noattack_out_ggg

The set Q consists of the following terms:

noattack_in_ggg(x0, x1, x2)
U8_ggg(x0, x1, x2, x3, x4)
notEq_in_gg(x0, x1)
U9_ggg(x0, x1, x2, x3, x4)
U15_gg(x0)
add_in_gga(x0, x1)
U10_ggg(x0, x1, x2, x3, x4)
U14_gga(x0)
U11_ggg(x0, x1, x2, x3, x4)
U12_ggg(x0, x1, x2, x3)
U13_ggg(x0)

We have to consider all (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
PiDP
                ↳ UsableRulesProof
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

DELETE_IN_AGA(X, .(F, T), .(F, R)) → DELETE_IN_AGA(X, T, R)

The TRS R consists of the following rules:

queens_in_a(Y) → U1_a(Y, perm_in_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y))
perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(.(X, Y), .(V, Res)) → U3_ga(X, Y, V, Res, delete_in_aga(V, .(X, Y), Rest))
delete_in_aga(X, .(X, Y), Y) → delete_out_aga(X, .(X, Y), Y)
delete_in_aga(X, .(F, T), .(F, R)) → U5_aga(X, F, T, R, delete_in_aga(X, T, R))
U5_aga(X, F, T, R, delete_out_aga(X, T, R)) → delete_out_aga(X, .(F, T), .(F, R))
U3_ga(X, Y, V, Res, delete_out_aga(V, .(X, Y), Rest)) → U4_ga(X, Y, V, Res, perm_in_ga(Rest, Res))
U4_ga(X, Y, V, Res, perm_out_ga(Rest, Res)) → perm_out_ga(.(X, Y), .(V, Res))
U1_a(Y, perm_out_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y)) → U2_a(Y, safe_in_g(Y))
safe_in_g([]) → safe_out_g([])
safe_in_g(.(X, Y)) → U6_g(X, Y, noattack_in_ggg(X, Y, s(0)))
noattack_in_ggg(X, [], N) → noattack_out_ggg(X, [], N)
noattack_in_ggg(X, .(F, T), N) → U8_ggg(X, F, T, N, notEq_in_gg(X, F))
notEq_in_gg(0, s(X)) → notEq_out_gg(0, s(X))
notEq_in_gg(s(X), 0) → notEq_out_gg(s(X), 0)
notEq_in_gg(s(X), s(Y)) → U15_gg(X, Y, notEq_in_gg(X, Y))
U15_gg(X, Y, notEq_out_gg(X, Y)) → notEq_out_gg(s(X), s(Y))
U8_ggg(X, F, T, N, notEq_out_gg(X, F)) → U9_ggg(X, F, T, N, add_in_gga(F, N, FplusN))
add_in_gga(0, X, X) → add_out_gga(0, X, X)
add_in_gga(s(X), Y, s(Z)) → U14_gga(X, Y, Z, add_in_gga(X, Y, Z))
U14_gga(X, Y, Z, add_out_gga(X, Y, Z)) → add_out_gga(s(X), Y, s(Z))
U9_ggg(X, F, T, N, add_out_gga(F, N, FplusN)) → U10_ggg(X, F, T, N, FplusN, notEq_in_gg(X, FplusN))
U10_ggg(X, F, T, N, FplusN, notEq_out_gg(X, FplusN)) → U11_ggg(X, F, T, N, FplusN, add_in_gga(X, N, XplusN))
U11_ggg(X, F, T, N, FplusN, add_out_gga(X, N, XplusN)) → U12_ggg(X, F, T, N, notEq_in_gg(F, XplusN))
U12_ggg(X, F, T, N, notEq_out_gg(F, XplusN)) → U13_ggg(X, F, T, N, noattack_in_ggg(X, T, s(N)))
U13_ggg(X, F, T, N, noattack_out_ggg(X, T, s(N))) → noattack_out_ggg(X, .(F, T), N)
U6_g(X, Y, noattack_out_ggg(X, Y, s(0))) → U7_g(X, Y, safe_in_g(Y))
U7_g(X, Y, safe_out_g(Y)) → safe_out_g(.(X, Y))
U2_a(Y, safe_out_g(Y)) → queens_out_a(Y)

The argument filtering Pi contains the following mapping:
queens_in_a(x1)  =  queens_in_a
U1_a(x1, x2)  =  U1_a(x2)
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
[]  =  []
perm_out_ga(x1, x2)  =  perm_out_ga(x2)
.(x1, x2)  =  .(x1, x2)
U3_ga(x1, x2, x3, x4, x5)  =  U3_ga(x5)
delete_in_aga(x1, x2, x3)  =  delete_in_aga(x2)
delete_out_aga(x1, x2, x3)  =  delete_out_aga(x1, x3)
U5_aga(x1, x2, x3, x4, x5)  =  U5_aga(x2, x5)
U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x3, x5)
s(x1)  =  s(x1)
0  =  0
U2_a(x1, x2)  =  U2_a(x1, x2)
safe_in_g(x1)  =  safe_in_g(x1)
safe_out_g(x1)  =  safe_out_g
U6_g(x1, x2, x3)  =  U6_g(x2, x3)
noattack_in_ggg(x1, x2, x3)  =  noattack_in_ggg(x1, x2, x3)
noattack_out_ggg(x1, x2, x3)  =  noattack_out_ggg
U8_ggg(x1, x2, x3, x4, x5)  =  U8_ggg(x1, x2, x3, x4, x5)
notEq_in_gg(x1, x2)  =  notEq_in_gg(x1, x2)
notEq_out_gg(x1, x2)  =  notEq_out_gg
U15_gg(x1, x2, x3)  =  U15_gg(x3)
U9_ggg(x1, x2, x3, x4, x5)  =  U9_ggg(x1, x2, x3, x4, x5)
add_in_gga(x1, x2, x3)  =  add_in_gga(x1, x2)
add_out_gga(x1, x2, x3)  =  add_out_gga(x3)
U14_gga(x1, x2, x3, x4)  =  U14_gga(x4)
U10_ggg(x1, x2, x3, x4, x5, x6)  =  U10_ggg(x1, x2, x3, x4, x6)
U11_ggg(x1, x2, x3, x4, x5, x6)  =  U11_ggg(x1, x2, x3, x4, x6)
U12_ggg(x1, x2, x3, x4, x5)  =  U12_ggg(x1, x3, x4, x5)
U13_ggg(x1, x2, x3, x4, x5)  =  U13_ggg(x5)
U7_g(x1, x2, x3)  =  U7_g(x3)
queens_out_a(x1)  =  queens_out_a(x1)
DELETE_IN_AGA(x1, x2, x3)  =  DELETE_IN_AGA(x2)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

DELETE_IN_AGA(X, .(F, T), .(F, R)) → DELETE_IN_AGA(X, T, R)

R is empty.
The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x1, x2)
DELETE_IN_AGA(x1, x2, x3)  =  DELETE_IN_AGA(x2)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ QDPSizeChangeProof
              ↳ PiDP

Q DP problem:
The TRS P consists of the following rules:

DELETE_IN_AGA(.(F, T)) → DELETE_IN_AGA(T)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
PiDP
                ↳ UsableRulesProof

Pi DP problem:
The TRS P consists of the following rules:

U3_GA(X, Y, V, Res, delete_out_aga(V, .(X, Y), Rest)) → PERM_IN_GA(Rest, Res)
PERM_IN_GA(.(X, Y), .(V, Res)) → U3_GA(X, Y, V, Res, delete_in_aga(V, .(X, Y), Rest))

The TRS R consists of the following rules:

queens_in_a(Y) → U1_a(Y, perm_in_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y))
perm_in_ga([], []) → perm_out_ga([], [])
perm_in_ga(.(X, Y), .(V, Res)) → U3_ga(X, Y, V, Res, delete_in_aga(V, .(X, Y), Rest))
delete_in_aga(X, .(X, Y), Y) → delete_out_aga(X, .(X, Y), Y)
delete_in_aga(X, .(F, T), .(F, R)) → U5_aga(X, F, T, R, delete_in_aga(X, T, R))
U5_aga(X, F, T, R, delete_out_aga(X, T, R)) → delete_out_aga(X, .(F, T), .(F, R))
U3_ga(X, Y, V, Res, delete_out_aga(V, .(X, Y), Rest)) → U4_ga(X, Y, V, Res, perm_in_ga(Rest, Res))
U4_ga(X, Y, V, Res, perm_out_ga(Rest, Res)) → perm_out_ga(.(X, Y), .(V, Res))
U1_a(Y, perm_out_ga(.(s(0), .(s(s(0)), .(s(s(s(0))), .(s(s(s(s(0)))), .(s(s(s(s(s(0))))), .(s(s(s(s(s(s(0)))))), .(s(s(s(s(s(s(s(0))))))), .(s(s(s(s(s(s(s(s(0)))))))), [])))))))), Y)) → U2_a(Y, safe_in_g(Y))
safe_in_g([]) → safe_out_g([])
safe_in_g(.(X, Y)) → U6_g(X, Y, noattack_in_ggg(X, Y, s(0)))
noattack_in_ggg(X, [], N) → noattack_out_ggg(X, [], N)
noattack_in_ggg(X, .(F, T), N) → U8_ggg(X, F, T, N, notEq_in_gg(X, F))
notEq_in_gg(0, s(X)) → notEq_out_gg(0, s(X))
notEq_in_gg(s(X), 0) → notEq_out_gg(s(X), 0)
notEq_in_gg(s(X), s(Y)) → U15_gg(X, Y, notEq_in_gg(X, Y))
U15_gg(X, Y, notEq_out_gg(X, Y)) → notEq_out_gg(s(X), s(Y))
U8_ggg(X, F, T, N, notEq_out_gg(X, F)) → U9_ggg(X, F, T, N, add_in_gga(F, N, FplusN))
add_in_gga(0, X, X) → add_out_gga(0, X, X)
add_in_gga(s(X), Y, s(Z)) → U14_gga(X, Y, Z, add_in_gga(X, Y, Z))
U14_gga(X, Y, Z, add_out_gga(X, Y, Z)) → add_out_gga(s(X), Y, s(Z))
U9_ggg(X, F, T, N, add_out_gga(F, N, FplusN)) → U10_ggg(X, F, T, N, FplusN, notEq_in_gg(X, FplusN))
U10_ggg(X, F, T, N, FplusN, notEq_out_gg(X, FplusN)) → U11_ggg(X, F, T, N, FplusN, add_in_gga(X, N, XplusN))
U11_ggg(X, F, T, N, FplusN, add_out_gga(X, N, XplusN)) → U12_ggg(X, F, T, N, notEq_in_gg(F, XplusN))
U12_ggg(X, F, T, N, notEq_out_gg(F, XplusN)) → U13_ggg(X, F, T, N, noattack_in_ggg(X, T, s(N)))
U13_ggg(X, F, T, N, noattack_out_ggg(X, T, s(N))) → noattack_out_ggg(X, .(F, T), N)
U6_g(X, Y, noattack_out_ggg(X, Y, s(0))) → U7_g(X, Y, safe_in_g(Y))
U7_g(X, Y, safe_out_g(Y)) → safe_out_g(.(X, Y))
U2_a(Y, safe_out_g(Y)) → queens_out_a(Y)

The argument filtering Pi contains the following mapping:
queens_in_a(x1)  =  queens_in_a
U1_a(x1, x2)  =  U1_a(x2)
perm_in_ga(x1, x2)  =  perm_in_ga(x1)
[]  =  []
perm_out_ga(x1, x2)  =  perm_out_ga(x2)
.(x1, x2)  =  .(x1, x2)
U3_ga(x1, x2, x3, x4, x5)  =  U3_ga(x5)
delete_in_aga(x1, x2, x3)  =  delete_in_aga(x2)
delete_out_aga(x1, x2, x3)  =  delete_out_aga(x1, x3)
U5_aga(x1, x2, x3, x4, x5)  =  U5_aga(x2, x5)
U4_ga(x1, x2, x3, x4, x5)  =  U4_ga(x3, x5)
s(x1)  =  s(x1)
0  =  0
U2_a(x1, x2)  =  U2_a(x1, x2)
safe_in_g(x1)  =  safe_in_g(x1)
safe_out_g(x1)  =  safe_out_g
U6_g(x1, x2, x3)  =  U6_g(x2, x3)
noattack_in_ggg(x1, x2, x3)  =  noattack_in_ggg(x1, x2, x3)
noattack_out_ggg(x1, x2, x3)  =  noattack_out_ggg
U8_ggg(x1, x2, x3, x4, x5)  =  U8_ggg(x1, x2, x3, x4, x5)
notEq_in_gg(x1, x2)  =  notEq_in_gg(x1, x2)
notEq_out_gg(x1, x2)  =  notEq_out_gg
U15_gg(x1, x2, x3)  =  U15_gg(x3)
U9_ggg(x1, x2, x3, x4, x5)  =  U9_ggg(x1, x2, x3, x4, x5)
add_in_gga(x1, x2, x3)  =  add_in_gga(x1, x2)
add_out_gga(x1, x2, x3)  =  add_out_gga(x3)
U14_gga(x1, x2, x3, x4)  =  U14_gga(x4)
U10_ggg(x1, x2, x3, x4, x5, x6)  =  U10_ggg(x1, x2, x3, x4, x6)
U11_ggg(x1, x2, x3, x4, x5, x6)  =  U11_ggg(x1, x2, x3, x4, x6)
U12_ggg(x1, x2, x3, x4, x5)  =  U12_ggg(x1, x3, x4, x5)
U13_ggg(x1, x2, x3, x4, x5)  =  U13_ggg(x5)
U7_g(x1, x2, x3)  =  U7_g(x3)
queens_out_a(x1)  =  queens_out_a(x1)
U3_GA(x1, x2, x3, x4, x5)  =  U3_GA(x5)
PERM_IN_GA(x1, x2)  =  PERM_IN_GA(x1)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof

Pi DP problem:
The TRS P consists of the following rules:

U3_GA(X, Y, V, Res, delete_out_aga(V, .(X, Y), Rest)) → PERM_IN_GA(Rest, Res)
PERM_IN_GA(.(X, Y), .(V, Res)) → U3_GA(X, Y, V, Res, delete_in_aga(V, .(X, Y), Rest))

The TRS R consists of the following rules:

delete_in_aga(X, .(X, Y), Y) → delete_out_aga(X, .(X, Y), Y)
delete_in_aga(X, .(F, T), .(F, R)) → U5_aga(X, F, T, R, delete_in_aga(X, T, R))
U5_aga(X, F, T, R, delete_out_aga(X, T, R)) → delete_out_aga(X, .(F, T), .(F, R))

The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x1, x2)
delete_in_aga(x1, x2, x3)  =  delete_in_aga(x2)
delete_out_aga(x1, x2, x3)  =  delete_out_aga(x1, x3)
U5_aga(x1, x2, x3, x4, x5)  =  U5_aga(x2, x5)
U3_GA(x1, x2, x3, x4, x5)  =  U3_GA(x5)
PERM_IN_GA(x1, x2)  =  PERM_IN_GA(x1)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ RuleRemovalProof

Q DP problem:
The TRS P consists of the following rules:

PERM_IN_GA(.(X, Y)) → U3_GA(delete_in_aga(.(X, Y)))
U3_GA(delete_out_aga(V, Rest)) → PERM_IN_GA(Rest)

The TRS R consists of the following rules:

delete_in_aga(.(X, Y)) → delete_out_aga(X, Y)
delete_in_aga(.(F, T)) → U5_aga(F, delete_in_aga(T))
U5_aga(F, delete_out_aga(X, R)) → delete_out_aga(X, .(F, R))

The set Q consists of the following terms:

delete_in_aga(x0)
U5_aga(x0, x1)

We have to consider all (P,Q,R)-chains.
By using the rule removal processor [15] with the following polynomial ordering [25], at least one Dependency Pair or term rewrite system rule of this QDP problem can be strictly oriented.

Strictly oriented rules of the TRS R:

delete_in_aga(.(X, Y)) → delete_out_aga(X, Y)

Used ordering: POLO with Polynomial interpretation [25]:

POL(.(x1, x2)) = 1 + x1 + 2·x2   
POL(PERM_IN_GA(x1)) = 2·x1   
POL(U3_GA(x1)) = 2·x1   
POL(U5_aga(x1, x2)) = 1 + x1 + 2·x2   
POL(delete_in_aga(x1)) = x1   
POL(delete_out_aga(x1, x2)) = x1 + x2   



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ RuleRemovalProof
QDP
                            ↳ RuleRemovalProof

Q DP problem:
The TRS P consists of the following rules:

PERM_IN_GA(.(X, Y)) → U3_GA(delete_in_aga(.(X, Y)))
U3_GA(delete_out_aga(V, Rest)) → PERM_IN_GA(Rest)

The TRS R consists of the following rules:

delete_in_aga(.(F, T)) → U5_aga(F, delete_in_aga(T))
U5_aga(F, delete_out_aga(X, R)) → delete_out_aga(X, .(F, R))

The set Q consists of the following terms:

delete_in_aga(x0)
U5_aga(x0, x1)

We have to consider all (P,Q,R)-chains.
By using the rule removal processor [15] with the following polynomial ordering [25], at least one Dependency Pair or term rewrite system rule of this QDP problem can be strictly oriented.
Strictly oriented dependency pairs:

U3_GA(delete_out_aga(V, Rest)) → PERM_IN_GA(Rest)


Used ordering: POLO with Polynomial interpretation [25]:

POL(.(x1, x2)) = x1 + x2   
POL(PERM_IN_GA(x1)) = 2·x1   
POL(U3_GA(x1)) = x1   
POL(U5_aga(x1, x2)) = 2·x1 + x2   
POL(delete_in_aga(x1)) = 2·x1   
POL(delete_out_aga(x1, x2)) = 2 + x1 + 2·x2   



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ RuleRemovalProof
                          ↳ QDP
                            ↳ RuleRemovalProof
QDP
                                ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

PERM_IN_GA(.(X, Y)) → U3_GA(delete_in_aga(.(X, Y)))

The TRS R consists of the following rules:

delete_in_aga(.(F, T)) → U5_aga(F, delete_in_aga(T))
U5_aga(F, delete_out_aga(X, R)) → delete_out_aga(X, .(F, R))

The set Q consists of the following terms:

delete_in_aga(x0)
U5_aga(x0, x1)

We have to consider all (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 0 SCCs with 1 less node.